/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: Universidad de La Frontera
 * License Type: Academic
 */
package orm;

import org.hibernate.Criteria;
import org.orm.PersistentException;
import org.orm.PersistentSession;
import org.orm.criteria.*;

public class ConsumoCriteria extends AbstractORMCriteria {
	public final IntegerExpression consumo_ID;
	public final StringExpression lectura;
	public final IntegerExpression monto;
	public final StringExpression fecha_emision;
	public final StringExpression fecha_termino;
	
	public ConsumoCriteria(Criteria criteria) {
		super(criteria);
		consumo_ID = new IntegerExpression("consumo_ID", this);
		lectura = new StringExpression("lectura", this);
		monto = new IntegerExpression("monto", this);
		fecha_emision = new StringExpression("fecha_emision", this);
		fecha_termino = new StringExpression("fecha_termino", this);
	}
	
	public ConsumoCriteria(PersistentSession session) {
		this(session.createCriteria(Consumo.class));
	}
	
	public ConsumoCriteria() throws PersistentException {
		this(orm.TrabajoAplicado1PersistentManager.instance().getSession());
	}
	
	public CuentaCriteria createCuentacuentaCriteria() {
		return new CuentaCriteria(createCriteria("cuentacuenta"));
	}
	
	public TipoConsumoCriteria createTipoConsumotipoconCriteria() {
		return new TipoConsumoCriteria(createCriteria("tipoConsumotipocon"));
	}
	
	public Consumo uniqueConsumo() {
		return (Consumo) super.uniqueResult();
	}
	
	public Consumo[] listConsumo() {
		java.util.List list = super.list();
		return (Consumo[]) list.toArray(new Consumo[list.size()]);
	}
}

